package com.polymorphic.polyparameter;

/**
 * @Author 小闽
 * @Date 2024/8/13 18:16
 * @PackageName: com.polymorphic.polyparameter
 * @ClassName: Manage
 * @Description: 经理类
 * @Version 1.0
 */
public class Manage extends Employee {
    /**
     * 奖金
     */
    private double bonus;

    /**
     * 构造器
     * @param name
     * @param salary
     * @param bonus
     */
    public Manage(String name, double salary, double bonus) {
        super(name, salary);
        this.bonus = bonus;
    }

    public double getBonus() {
        return bonus;
    }

    public void setBonus(double bonus) {
        this.bonus = bonus;
    }
    /**
     * 管理manage方法
     */
    public void manage(){
        System.out.println("经理" + getName() + "正在开发部开项目会议....");
    }

    /**
     * 重写父类的getAnnual()方法
     * @param
     * @return
     */
    @Override
    public double getAnnual() {
        return super.getAnnual() + bonus;
    }
}
